package semo;

public class Third{
    public  static  void test1(Animal animal){
        animal.eat();
    }
    public static void test2(IRunning iRunning){
        iRunning.run();
    }
    public static void test3(ISwimming iSwimming){
        iSwimming.swim();
    }
    public static void test4(IFlying iFlying){
        iFlying.fly();
    }

    public static void main(String[] args) {
        Dog dog = new Dog("小狗",10);
        test2(dog);
        test3(dog);

        test2(new Robot());
    }
    public static void main1(String[] args) {
        Dog dog = new Dog("小狗",10);
        test1(dog);
    }



}